<?php 
/**
 * ypCore 2.0
 *
 * @author: Le Van Duyet
 * @website: http://lemon9x.com
 * @email: duyet2000@gmail.com
 */
error_reporting(E_ALL);
//error_reporting(E_ERROR | E_USER_ERROR);

$_this = __file__;

if (!file_exists(pathinfo($_this, PATHINFO_DIRNAME) . '/settings.php')) {
	trigger_error('Error:: Settings file was not exists!');
}
require_once (pathinfo($_this, PATHINFO_DIRNAME) . '/settings.php');

if (!file_exists(APP_CONFIG_FILE) AND file_exists(YPCORE_ROOT . '/install/index.php')) {
	header('Location: ./install/index.php');
	exit;
}

// Auto load
require_once (YPCORE_ROOT . '/' . YPCORE_DIR . '/class/autoloader.php');
__AUTOLOADER::getInstance()->setupAutoloader(YPCORE_ROOT);

$ypCore = new ypCore(new ypRegistry());

// And finish, Run it :)
$ypCore->run();

// And I finish all code, relaxing

?>